<template>
  <div>
    <div class="seed_top_banner">
      <div class="seed_back_arrow" @click="back">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-zuo"></use>
        </svg>
      </div>
      <div class="seed_page_title"><span>设置</span></div>
      <div class="seed_page_tool"></div>
    </div>
    <!--列表-->
    <div class="seed_my_manager_set_con">
      <div class="seed_my_manager_list_box" v-for="(item, index) in list" v-bind:key="index">
        <div class="seed_my_set_line"></div>
        <div class="seed_my_manager_list">
          <div class="seed_my_manager_list_inner1">
            <span class="seed_my_manager_list_tip"></span>
          </div>
          <div class="seed_my_manager_list_inner">
            <div class="seed_my_manager_list_inner2">
              <div class="seed_my_manager_list_inner2_l">创建时间:&ensp;{{item.add_time}}</div>
              <div class="seed_my_manager_list_inner2_r">
                <button @click="edit(item.admin_id)">编辑</button>
              </div>
            </div>
            <div class="seed_my_manager_list_inner3">
              <p>账&emsp;号:&ensp;{{item.account}}</p>
              <p>用户名:&ensp;{{item.realname}}</p>
              <p>手机号:&ensp;{{item.mobile}}</p>
              <p>邮&emsp;箱:&ensp;{{item.email}}</p>
            </div>
          </div>
        </div>
      </div>
    </div>
    <router-link :to="{name: 'my-manager_add'}">
      <div class="seed_my_manager_set_btn">
        <svg class="icon" aria-hidden="true" style="font-size: 2rem; vertical-align: -0.20em !important;">
          <use xlink:href="#icon-tianjia"></use>
        </svg>
          <span style="font-size: 1.5rem;">新增管理员</span>
      </div>
    </router-link>
  </div>
</template>
<script>
export default {
  data () {
    return {
      list: []
    }
  },
  created () {
    this.getManagerList()
  },
  methods: {
    back () {
      this.$router.push({name: 'my-my'})
    },
    getManagerList () {
      this.$request.ManagerList().then(data => {
        this.list = data
      })
    },
    edit (id) {
      this.$router.push({name: 'my-manager_edit', params: {id: id}})
    }
  }
}
</script>
